﻿using MvvmFoundation.Silverlight;

namespace SilverlightDemoApp.Model
{
    /// <summary>
    /// 
    /// </summary>
    public class Question : ObservableObject
    {
        private string _provided;

        /// <summary>
        /// 
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string ActualAnswer { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string ProvidedAnswer
        {
            get { return _provided; }
            set
            {
                _provided = value;
                RaisePropertyChanged("ProvidedAnswer");
                RaisePropertyChanged("Grade");
            }
        }

        //private bool _grade;
        public bool Grade
        {
            get { return (ActualAnswer == _provided); }
            set
            {
                //_grade = value;
                RaisePropertyChanged("Grade");
            }
        }
    }
}